<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<style>
.formLib{padding:20px 0; clear:both;}
.formLib input{padding:0 10px; height:36px; border:1px solid #ccc; width:240px;}
.formLib .form_lilib{position:relative; margin-bottom:20px; font-size:0;}
.form_lilib *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:14px; line-height:36px;}
.form_lilib label{width:100px; height:36px; text-align:right; padding-right:5px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
.form_lilib span{padding:0 5px;}
.from_msg{padding-left:10px; font-size:12px; color:#999;}
.from_msg a{color:#3595CC}
.form_libtn{padding-left:105px; font-size:12px; color:#999;}
.formLib .BB_button{line-height:30px; padding:0 30px; border:none; background:#f40; color:#fff; }
form.cmxform {
	width: 370px;
	font-size: 1.0em;
	color: #333;
}

form.cmxform legend {
	padding-left: 0;
}

form.cmxform legend, form.cmxform label {
	color: #333;
}

form.cmxform fieldset {
	border: none;
	border-top: 1px solid #C9DCA6;
	background: url(../images/cmxform-fieldset.gif) left bottom repeat-x;
	background-color: #F8FDEF;
}

form.cmxform fieldset fieldset {
	background: none;
}

form.cmxform fieldset p, form.cmxform fieldset fieldset {
	padding: 5px 10px 7px;
	background: url(../images/cmxform-divider.gif) left bottom repeat-x;
}

form.cmxform label.error, label.error {
	/* remove the next line when you have trouble in IE6 with labels in list */
	color: red;
	width:160px;
	font-style: italic
}
div.error { display: none; }
input {	border: 1px solid black; }
input.checkbox { border: none }
input:focus { border: 1px dotted black; }
input.error { border: 1px dotted red; }
form.cmxform .gray * { color: gray; }
</style>

<form action="<c:url value="/complaint/addEmBComplaint.s" />" id="dialogfeedbackForm" method="post">
	<input type="hidden" name="complaint" value="WEB-浮动条">
	<input type="hidden" name="typeId" value="54">
	<ul class="formLib">
		<li class="form_lilib">
			<label>标题：</label>
			<input type="text"  name="complaintTitle" placeholder="请输入标题"  required="true" >
		</li>
		<li class="form_lilib">
			<label>联系电话：</label>
			<input type="text" name="connectPhone" placeholder="请输入联系电话" required="true" phoneUS="true" >
		</li>
		<li class="form_lilib">
			<label>内容：</label>
			<textarea   name="complaintContent" cols="60" rows="4" placeholder="请输入反馈的内容" required="true"></textarea>
		</li>
		<li class="form_libtn form_regtn">
			<input type="button" class="BB_button" value="提交" style="cursor: pointer;" onclick="dialogfeedbackSubmit();">
		</li>
	</ul>
</form>
<script>
$("#dialogfeedbackForm").validate();
//弹出框的 反馈提交
function dialogfeedbackSubmit(){

	if($("#dialogfeedbackForm").valid()){
		$("#dialogfeedbackForm").ajaxSubmit({  
			type:"post",  //提交方式  
			data:$('#dialogfeedbackForm').serialize(),
            dataType:"json", //数据类型  
            success:function(data){ //提交成功的回调函数  
                if(data.code=="200"){
                	 layer.msg('提交反馈成功 感谢您的参与!',1, {type:1,shade: [0.2, '#ccc']});
                	 layer.close(dialogFeedBack);
                }
                if(data.code=="100"){
                	layer.msg(data.result,1, {type: 8,shade: [0.2, '#ccc']});
                }
            }  
        });
		
	}
	
}
</script>